import {uploadRequest} from '../api.js'

/**
 * 热熔记录上传
 * @param query 热熔记录
 * @returns {Promise<unknown>}
 */
export const uploadHot = record => {
  let {MachineId, WelderID, ProjectID, ManagerID, ManufactureID, RecordNum, WeldNum, standard, machineModel, SDR,
    Material, Diameter, ReplaceMachineID, Appearance, UserCode, Result, IsTimeValid, RecordTime, Latitude, Longitude,
    PhoneNumber, CylinderArea, DragPressure, SetWeldTemp, ActWeldTemp, SetFlangingPressure, ActFlangingPressure,
    SetFlangingTime, ActFlangingTime, SetAbsorbHeatPressure, ActAbsorbHeatPressure, SetAbsorbHeatTime,
    ActAbsorbHeatTime, SwitchingPeriod, BoostPressurePeriod, SetJointPressure, ActJointPressure, SetCoolingTime,
    ActCoolingTime} = record;
  return uploadRequest({
    url: 'Interaction/AddButtRecord',
    data: {
      MachineId, WelderID, ProjectID, ManagerID, ManufactureID, RecordNum, WeldNum, standard, machineModel, SDR,
      Material, Diameter, ReplaceMachineID, Appearance, UserCode, Result, IsTimeValid, RecordTime, Latitude, Longitude,
      PhoneNumber, CylinderArea, DragPressure, SetWeldTemp, ActWeldTemp, SetFlangingPressure, ActFlangingPressure,
      SetFlangingTime, ActFlangingTime, SetAbsorbHeatPressure, ActAbsorbHeatPressure, SetAbsorbHeatTime,
      ActAbsorbHeatTime, SwitchingPeriod, BoostPressurePeriod, SetJointPressure, ActJointPressure, SetCoolingTime,
      ActCoolingTime
    }
  })
}
